﻿using Diablo3.Services.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace Diablo3.Services.Model.Profiles
{
    [DataContract]
    public class Death
    {
        #region Properties

        /// <summary>
        /// The killer
        /// </summary>
        [DataMember(Name = "killer")]
        private int _killer = 0;
        /// <summary>
        /// Gets the killer.
        /// </summary>
        /// <value>
        /// The killer.
        /// </value>
        public int Killer
        {
            get { return this._killer; }
        }

        /// <summary>
        /// The location
        /// </summary>
        [DataMember(Name = "location")]
        private int _location = 0;
        /// <summary>
        /// Gets the location.
        /// </summary>
        /// <value>
        /// The location.
        /// </value>
        public int Location
        {
            get { return this._location; }
        }

        /// <summary>
        /// The time
        /// </summary>
        [DataMember(Name = "time")]
        private long _time = 0;
        /// <summary>
        /// Gets the time.
        /// </summary>
        /// <value>
        /// The time.
        /// </value>
        public DateTimeOffset Time
        {
            get { return this._time.ToUnixTimestamp(); }
        }

        #endregion

        #region Ctor

        /// <summary>
        /// Initializes a new instance of the <see cref="Death" /> class.
        /// </summary>
        public Death()
        {
        }

        #endregion
    }
}
